class bsp_object : public base_object, particle, local_system
{
public:
int type;
int active;
vector rot;
bsp_object *next_elem;
bsp_object *source;
bsp_node *node;
bsp_object()
{ node=0; col_flag=0; source=0; next_elem=0; type=0; };
void add_to_bsp();
void remove_from_bsp();
virtual int step(int dt)
{ return particle::step(dt); };
virtual bsp_object *clone()
{ return 0; };
virtual mesh *get_mesh()
{ return 0; };
virtual void init()
{ ; };
int get_param_desc(int i,param_desc *pd);
virtual int get_custom_param_desc(int i,param_desc *pd)
{ return 0; };
virtual mesh *ray_intersect(vector& ro,vector& rd,vector& ip,float&
dist,int &facenum,float rad=0.0f);
virtual int message(vector& p,float rad,int msg,int param,void *data)
{ return 0; };
virtual void draw();
void load_default_params(fly_pak *file,char *sec);
void load_params(fly_pak *file,char *sec);
virtual ~bsp_object()
{ if (node) remove_from_bsp(); };
};
Member | Type | Description |
---|---|---|
type | int | the object type (Fly3D plug-in type) |
active | int | active flag (FALSE for inactive, TRUE activate on startup) |
latedraw | int | last frame the object was draw |
rot | vector | object rotation |
next_elem | bsp_object * | next element in objects node linked list |
source | bsp_object * | the object this one was cloned from (NULL if original object) |
node | bsp_node * | the bsp_node the object is in |
add_to_bsp, remove_from_bsp, step, clone, get_mesh, init, get_param_desc, get_custom_param_desc, ray_intersect, ray_intersect_test, message, draw, load_default_params, load_params
This class implements a bsp_object. All objects created in Fly3D plug-ins must derive from this class. It is the base class for all objects that will be included in the bsp. New object behavior is implemented by sub-classing the class and implementing its virtual functions.